package snippets.cse524.activeDates;

import java.util.GregorianCalendar;

import org.apache.commons.lang3.StringEscapeUtils;

import snippets.utils.Utils;

public class Office extends SuccessionInfo {
	public static String getOfficeName(String input) {
		input = input.replaceAll(Utils.CUSTOM_WIKI_LINK_REGEX, "$1+$2");
		input = Utils.trimPlusPalindromes(input);
		input = input.replaceAll("#", " - ");
		return input;
	}

	public String getBeginDate() {
		return beginDate;
	}

	public String getEndDate() {
		return endDate;
	}

	public Office(String title, int times, String beginDate, String endDate) {
		super(getOfficeName(title), times);
		this.beginDate = StringEscapeUtils.unescapeHtml4(beginDate);
		this.endDate = StringEscapeUtils.unescapeHtml4(endDate);
	}

	private final String beginDate;
	private final String endDate;
}
